
import random
m = 50

while 1:
    if m <= 0:
        print("你输了")
        break
    if m >=100:
        print("你赢了")
        break
    system = random.randint(0,2)
    a=input("0代表石头1代表剪刀2代表布")
    b =int(a)
    if system == 0 and b == 1:   
        print("你输了,扣5块钱")
        m -=5
        continue
    if system == 0 and b == 2:  
        print("你赢了,加10块钱")
        m += 10
        continue
    if system == 1 and b == 0:    
        print("你赢了,加10块钱")
        m += 10
        continue
    if system == 1 and b == 2: 
        print("你输了,扣5块钱")
        m -= 5
        continue
    if system == 2 and b == 0:   
        print("你输了,扣5块钱")
        m -= 5
        continue
    if system == 2 and b == 1: 
        print("你赢了,加10块钱")
        m += 10
        continue
    print("打平了")
